package com.exsun.ex1077.ui.fragment.vehiclevideo

import androidx.lifecycle.MutableLiveData
import com.alibaba.fastjson.JSONObject
import com.exsun.ex1077.network.apiService
import com.exsun.ex1077.network.entity.MapVehicleGps
import com.exsun.ex1077.network.entity.VehicleVideo
import com.zhangping.fastjetpack.base.BaseViewModel
import com.zhangping.fastjetpack.extend.base.ResultState
import com.zhangping.fastjetpack.extend.base.request

/**
 * 描述：
 * 作者：ZhangPing
 * 创建时间：2022/8/11 9:29
 */
class VehicleVideoViewModel: BaseViewModel() {

    val mapVehicleGpsResult = MutableLiveData<ResultState<MapVehicleGps?>>()

    fun loadVehicleData(deviceId: String){
        if (deviceId.isEmpty()) return
        request({ apiService.mapVehicleGps(deviceId)}, mapVehicleGpsResult)
    }

}